//
//  CameraRecorder.h
//  舞媚娘
//
//  Created by 陈超 on 16/8/9.
//  Copyright © 2016年 陈超. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import <UIKit/UIKit.h>
#import "CameraTransformModel.h"
#import "BorderModel.h"
typedef void (^UserDeniedAuthorizationBlock)();
@protocol RecordFinshedDelegate <NSObject>
-(void)RecordFinshed:(NSURL *)outPutVideoUrl error:(NSError*)error;
@end
@interface CameraRecorder : NSObject<AVCaptureVideoDataOutputSampleBufferDelegate>
@property (assign, nonatomic) BOOL isCapturing;


@property(strong,nonatomic)CameraTransformModel *tranformModel;
@property(strong,nonatomic)BorderModel *borderModel;
@property(strong,nonatomic)NSString *songName;
-(void)switchCamera;
-(void)changeTransform;
-(void)stopRecord;
-(void)stopAnimation;
-(void)startAnimation;
-(void)startRecord;
-(void)updateBorder;
-(void)resetPreViewToPartNum;
-(void)setFlashEnable:(BOOL)value;
- (void)changeBrightNess:(float)value;
-(BOOL)isFlashOn;
-(float)getBrightNess;
-(float)getMinBrightNess;
-(float)getMaxBrightNess;

-(instancetype)initWithParams:(UIView *)superView delegate:(id<RecordFinshedDelegate>)delegate userDeniedAuthorizationBlock:(UserDeniedAuthorizationBlock)userDeniedAuthorizationBlock;
@end
